
((_global_)=>{
	if(!Reflect.has(_global_, 'mtec')){
		Reflect.set(_global_, 'mtec', {});
		Reflect.set(mtec, '__mtec__', 'Many technologies');
	}

	if(!mtec.time){
		Reflect.set(mtec, 'time', {});
	}
	Reflect.set(mtec.time, '__space_description__', 'This is a mtec subnamespace for time');
})(window ?? globalThis);

Reflect.set(mtec.time, 'ONE_DAY', 24 * 60 * 60 * 1000);

mtec.time.sameDay = function(d1, d2){
	if ([d1, d2].includes(undefined)) return false;
	let [day1, day2] = [d1, d2].map(d => new Date(d));
	return day1.toDateString() === day2.toDateString();
};
